<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>wstbest</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	</head>

	<body>
		<div class="box" id="box">Hi</div>
		<audio src="music/song.mp3"  autoplay="autoplay" autoplay preload loop controls id="audio"></audio>
		<script type="text/javascript">
			document.body.style.height = window.innerHeight + "px";

			/*动态改变根元素字体大小*/
			function recalc() {
				//
				var clientWidth = document.documentElement.clientWidth;
				if(!clientWidth) return;
				document.documentElement.style.fontSize = 40 * (clientWidth / 750) + 'px';
				// 字体大小   = 1个rem单位表示多少个像素（设备的宽度   /设计宽度）
			}

			function initRecalc() {
				recalc();
				var resizeEvt = 'osrientationchange' in window ? 'orientationchange' : 'resize';
				if(!document.addEventListener) return;
				window.addEventListener(resizeEvt, recalc, false);
				document.addEventListener('DOMContentLoaded', recalc, false);
			}
			initRecalc();
		</script>
		<script type="text/javascript" src="js/jquery-2.1.0.js"></script>
		<script type="text/javascript" src="js/bootstrap.js"></script>
		
		<script type="text/jscript" src="js/index.js"></script>
		
	</body>

</html>